package cn.rulian.base.common.dto;

import java.util.List;

import javax.servlet.http.HttpSession;

import cn.rulian.base.auth.bo.User;
import cn.rulian.base.auth.pojo.Sys;

/** 
 * session中存放的用户信息
 * 
 */
public class UserInfo
{
	private User user; //用户信息
	private Sys sys; //当前使用的系统信息
	private List<Long> roleIds; //拥有的角色ID列表。用于过滤器中的权限过滤。
	private String buttonAuthCode; //按钮权限码，用于验证页面中按钮的显示与否
	
	public User getUser()
	{
		return user;
	}
	public void setUser(User user)
	{
		this.user = user;
	}
	public List<Long> getRoleIds()
	{
		return roleIds;
	}
	public void setRoleIds(List<Long> roleIds)
	{
		this.roleIds = roleIds;
	}
	public String getButtonAuthCode()
	{
		return buttonAuthCode;
	}
	public void setButtonAuthCode(String buttonAuthCode)
	{
		this.buttonAuthCode = buttonAuthCode;
	}
	
	public static UserInfo getUserInfo(HttpSession session)
	{
		return (UserInfo)session.getAttribute("userInfo");
	}
	
	public Sys getSys() {
		return sys;
	}
	
	public void setSys(Sys sys) {
		this.sys = sys;
	}
	
	
}
